Recently, one of moving image coding methods widely used in picturephone systems, video distribution systems (streaming), etc., is the MPEG-4 (Moving Picture Experts Group phase 4). Visual (ISO/IEC 14496-2). The MPEG-4 Visual employs a compression method using prediction in the time direction.
FIG. 9(A) is a diagram showing an example of prediction coding using the MPEG-4 Visual and this example is configured with I-frames (I1 and I7 of FIG. 9(A)) that only use information in an image for coding without any reference image and P-frames (Pn: n=2, 3, 4, 5, and 6 of FIG. 9(A)), each of which is prediction coding using frame that is coded just before the current one as the reference image. For example, the frame P4 is prediction coded using the frame P3 that is coded just before the current one as the reference image.
Recently, an application utilizing a coding method called MPEG-4 AVC (ISO/IEC 14496-10) has been developed. One feature of the MPEG-4 AVC is prediction coding using more than one reference images.
FIG. 9(B) is a diagram showing an example of the prediction coding using the MPEG-4 AVC and this example is configured with I-frames (I1 and I7 of FIG. 9(B)) that only use information in an image for coding without the reference image and P-frames (Pn: n=2, 3, 4, 5, and 6 of FIG. 9(A)) that is prediction coding using one or more of the previously coded frames as the reference images. For example, the frame P4 is prediction coding using the previously coded frame I1, frame P2, and frame P3 as the reference images.
By the way, in an environment where errors are mixed in a communication path, such as a wireless communication, images are not always decoded correctly on a receiving side. Since the prediction coding is used, if an error occurs in one frame, the error is propagated not only to the error occurring frame but also to the subsequent frames. For example, if an error is detected in the frame P4 shaded with the slanting lines in FIG. 9(A), the error is propagated not only to the frame P4 but also to the frame P5 referring to the frame P4 and to the frame P6 referring to the frame P5, and causes the deterioration of image quality. To avoid this, the processes are performed so as not to display the frames with errors (frame P4, frame P5, and frame P6 of FIG. 9(A)) on the receiving side or so as to replace the error portion (error block in frame P4) with another image.
For example, in a method disclosed in the patent document 1 “moving image decoder”, if an error is detected in one frame, the coded data is skipped over to the next frame not requiring a reference image.
FIG. 10 is a diagram showing a processing flow when an error occurs in a conventional method, and if an error occurs, a picture header is searched (S31); it is judged whether the picture header is detected (S32); if the picture header is not detected, the search is repeated until the picture header is detected. If the picture header is detected, it is judged whether the picture header is an I-picture (S33). If the picture header is an I-picture, a decoding processing is performed and the processing is terminated (S34). If the picture header is not an I-picture, the processing goes back to S31 to search the next picture header. That is, if an error occurs, the processing is performed to skip over the coded data to detect the next I-picture.
In a method disclosed in patent document title 2 “A method and a device for decoding moving image compression code”, if an error is detected in one frame, the frame that is decoded just before the error detected frame is used to perform concealment.    Patent Document 1: Japanese Laid-Open Patent Publication No. 8-149474    Patent Document 2: Japanese Laid-Open Patent Publication No. 9-93589